var express = require('express');
var router = express.Router();
var urllib = require('url');
/* GET home page. */

var resData = {
  "ret": true,
  "data": {
    "swiperList": [{
      "id": "0001",
      "imgUrl": "/static/images/swiper-1.jpg"
    },
      {
        "id": "0002",
        "imgUrl": "/static/images/swiper-2.jpg"
      }],
    "iconList": [{
      "id": "0001",
      "iconUrl": "/static/images/icon-item-1.png",
      "desc": "景点门票"
    },
      {
        "id": "0002",
        "iconUrl": "/static/images/icon-item-2.png",
        "desc": "必游榜单"
      },
      {
        "id": "0003",
        "iconUrl": "/static/images/icon-item-3.png",
        "desc": "踏青赏花"
      },
      {
        "id": "0004",
        "iconUrl": "/static/images/icon-item-4.png",
        "desc": "一日游"
      },
      {
        "id": "0005",
        "iconUrl": "/static/images/icon-item-5.png",
        "desc": "名胜古迹"
      },
      {
        "id": "0006",
        "iconUrl": "/static/images/icon-item-15.png",
        "desc": "夫子庙"
      },
      {
        "id": "0007",
        "iconUrl": "/static/images/icon-item-16.png",
        "desc": "总统府"
      },
      {
        "id": "0008",
        "iconUrl": "/static/images/icon-item-11.png",
        "desc": "中山陵"
      },
      {
        "id": "0009",
        "iconUrl": "/static/images/icon-item-14.png",
        "desc": "万达主题乐园"
      },
      {
        "id": "0010",
        "iconUrl": "/static/images/icon-item-17.png",
        "desc": "牛首山"
      }],
    "recommendList": [{
      "id": "0001",
      "imgUrl": "/static/images/recommend-1.jpg",
      "title": "南京万达主题乐园",
      "desc": "南京万达主题乐园"
    },
      {
        "id": "0002",
        "imgUrl": "/static/images/recommend-2.jpg",
        "title": "南京海底世界",
        "desc": "南京海底世界"
      }],
    "weekendList": [{
      "id": "0001",
      "imgUrl": "/static/images/weekend-1.jpg",
      "title": "南京必游TOP10",
      "desc": "看尽王侯将相荣辱成败，六朝金粉潮起潮落"
    },
      {
        "id": "0002",
        "imgUrl": "/static/images/weekend-2.jpg",
        "title": "民国情怀国共风华",
        "desc": "找到你心中想要的那个民国时期的南京"
      }]
  }
};




router.get('/index.json', function(req, res, next) {
  res.writeHead(200,{'Content-Type':'text/html;charset=utf-8'});//设置response编码为utf-8
  res.end(JSON.stringify(resData));
});

module.exports = router;